﻿using System.Windows;
using RollManagerWPF;

namespace RollManager
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App
    {
        protected override void OnStartup( StartupEventArgs e )
        {
            using( SingleProgramInstance spi = new SingleProgramInstance() )
            {
                if( !spi.IsSingleInstance )
                {
                    spi.RaiseOtherProcess();
                    Shutdown();
                }
            }
        }
    }
}
